home *** CD-ROM | disk | FTP | other *** search
/ USGS: Oil & Gas Fields of Asia Pacific / USGS Maps Showing Geology, Oil & Gas Fields of Asia Pacific.iso / pc / ASPAC / VIEWS03 / SCRIPTS / IDENTIFY.AVE < prev    next >
Text File  |  1999-03-10  |  5KB  |  161 lines

  1. theView = av.GetActiveDoc
  2. found = FALSE
  3. p = theView.GetDisplay.ReturnUserPoint
  4. for each t in theView.GetActiveThemes
  5.   if (t.CanFindByPoint) then
  6.     keys = t.FindByPoint(p)
  7.     for each key in keys
  8.       found = TRUE
  9.       idlabel = t.GetName++"-"
  10.       f = NIL
  11.       if (t.CanLabel) then
  12.          f = t.GetLabelField
  13.       end
  14.       
  15.       if (f = NIL) then
  16.         if (key.Is(Number)) then
  17.          idlabel = idlabel++key.SetFormat("d").AsString
  18.         else
  19.          idlabel = idlabel++" X :"++key.GetX.AsString++" Y :"++key.GetY.AsString
  20.         end
  21.            t.Identify(key, idlabel)
  22.       else
  23.        t3 = t.GetName
  24.        if ((t3 = "Geologic age") or (t3 = "Rock type") or (t3 = "Labels")) then
  25.         theTable = t.GetFTab
  26.         f1 = theTable.FindField("Gen_glg")
  27.         s1 = t.ReturnValueString(f1.GetName, key)
  28.              if (s1 = "CzMz") then
  29.            id1 = "Cenozoic - Mesozoic"
  30.           elseif (s1 = "Cz") then
  31.            id1 = "Cenozoic"
  32.           elseif (s1 = "Q") then
  33.            id1 = "Quaternary"
  34.           elseif (s1 = "T") then
  35.            id1 = "Tertiary"
  36.           elseif (s1 = "N") then
  37.            id1 = "Neogene"
  38.              elseif (s1 = "Pg") then
  39.               id1 = "Paleogene"
  40.              elseif (s1 = "TK") then
  41.               id1 = "Tertiary - Cretaceous"
  42.              elseif (s1 = "Mz") then
  43.               id1 = "Mesozoic"
  44.              elseif (s1 = "K") then
  45.               id1 = "Cretaceous"
  46.              elseif (s1 = "KJ") then
  47.               id1 = "Cretaceous - Jurassic"
  48.              elseif (s1 = "J") then
  49.               id1 = "Jurassic"
  50.              elseif (s1 = "JTr") then
  51.               id1 = "Jurassic - Triassic"
  52.              elseif (s1 = "Tr") then
  53.               id1 = "Triassic"
  54.              elseif (s1 = "MzPz") then
  55.               id1 = "Mesozoic - Paleozoic"
  56.              elseif (s1 = "PzpCm") then
  57.            id1 = "Paleozoic - Precambrian"
  58.              elseif (s1 = "Pz") then
  59.               id1 = "Paleozoic" 
  60.              elseif (s1 = "Pzu") then
  61.               id1 = "Lower Paleozoic"
  62.              elseif (s1 = "TrP") then
  63.               id1 = "Triassic - Permian"
  64.              elseif (s1 = "P") then
  65.               id1 = "Permian" 
  66.              elseif (s1 = "PC") then
  67.               id1 = "Permian - Carboniferous"
  68.           elseif (s1 = "C") then
  69.               id1 = "Carboniferous"
  70.              elseif (s1 = "CD") then
  71.               id1 = "Carboniferous - Devonian"
  72.              elseif (s1 = "Pzl") then
  73.               id1 = "Lower Paleozoic"
  74.           elseif (s1 = "D") then
  75.               id1 = "Devonian"
  76.              elseif (s1 = "DS") then
  77.               id1 = "Devonian - Silurian"
  78.           elseif (s1 = "S") then
  79.               id1 = "Silurian"
  80.              elseif (s1 = "SO") then
  81.               id1 = "Silurian - Ordovician"
  82.              elseif (s1 = "O") then
  83.               id1 = "Ordovician"
  84.              elseif (s1 = "OCm") then
  85.               id1 = "Ordovician - Cambrian"
  86.              elseif (s1 = "Cm") then
  87.               id1 = "Cambrian"
  88.              elseif (s1 = "pCm") then
  89.               id1 = "Precambrian"
  90.              elseif (s1 = "Pt") then
  91.               id1 = "Proterozoic"
  92.              elseif (s1 = "A") then
  93.               id1 = "Archean"
  94.              elseif (s1 = "und") then
  95.               id1 = "Undetermined Age"
  96.              elseif (s1 = "H2O") then
  97.               id1 = "Surface Water or Sea"
  98.              elseif (s1 = "oth") then
  99.               id1 = "Geology Not Shown"
  100.           end
  101.        f2 = theTable.FindField("Type")
  102.        s2 = t.ReturnValueString(f2.GetName, key)
  103.              if ((s2 = "") or (s2 = "x")) then
  104.               id2 = ""
  105.              elseif (s2 = "v") then
  106.            id2 = "Extrusive Igneous"
  107.              elseif (s2 = "i") then
  108.               id2 = "Intrusive Igneous"
  109.              elseif (s2 = "w") then
  110.            id2 = "Ultrabasic Igneous or Ophiolite"
  111.           elseif (s2 = "e") then
  112.            id2 = "Eolian Deposits"    
  113.           end
  114.         MsgBox.Info(id1+NL+id2, "Generalized Geology")
  115.         
  116.         
  117.       elseif (t3 = "Geologic provinces") then
  118.         theTable = t.GetFTab
  119.         f1 = theTable.FindField("Code")
  120.         s1 = t.ReturnValueString(f1.GetName, key)
  121.         f2 = theTable.FindField("Name")
  122.            s2 = t.ReturnValueString(f2.GetName, key)
  123.         MsgBox.Info(s1+NL+s2, "Geologic Province")
  124.       
  125.       elseif (t3 = "Selected cities") then
  126.           theTable = t.GetFTab
  127.           f1 = theTable.FindField("Name")
  128.           s1 = t.ReturnValueString(f1.GetName, key)
  129.           f2 = theTable.FindField("Cntry_name")
  130.           s2 = t.ReturnValueString(f2.GetName, key)
  131.           MsgBox.Info(s1+NL+s2, "Major Cities")
  132.        
  133.       elseif (t3 = "Field centerpoints") then
  134.            theTable = t.GetFTab
  135.            f1 = theTable.FindField("Commodity")
  136.            s1 = t.ReturnValueString(f1.GetName, key)
  137.             if (s1 = "Oil") then
  138.               id1 = "Classed as Oil Field"
  139.             else
  140.               id1 = "Classed as Gas Field"
  141.             end
  142.             f2 = theTable.FindField("Country")
  143.             s2 = t.ReturnValueString(f2.GetName, key)
  144.             MsgBox.Info(id1+NL+s2, "Oil/Gas Field Centerpoints")
  145.        else
  146.             s = t.ReturnValueString(f.GetName, key)
  147.             idlabel = idlabel++s
  148.             t.Identify(key, idlabel) 
  149.         
  150.        end
  151.       
  152.     end
  153.    end
  154.  end
  155.  end
  156. if (not found) then
  157.   System.Beep
  158. end
  159. theView = av.GetActiveDoc
  160.  
  161.